<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
    '<div contenteditable>|x</div>',
    'insertHTML <blockquote type="cite"><div>Blockquoted Text</div></blockquote>',
    '<div contenteditable>Blockquoted Text|x</div>'),
    'Insert BLOCKQUOTE and strip it');

test(() => assert_selection(
    [
        '<div contenteditable>',
            '<blockquote type="cite">',
                '<div>Blockquoted |Text</div>',
            '</blockquote>',
        '</div>',
    ].join(''),
    'insertHTML <div>foo</div><div>bar</div>',
    [
        '<div contenteditable>',
            '<blockquote type="cite">',
                '<div>Blockquotedfoo</div>',
            '</blockquote>',
            '<blockquote type="cite">',
                '<div>bar|Text</div>',
            '</blockquote>',
        '</div>',
    ].join('')),
    'Paragraphs go into BLOCKQUOTE');
</script>
